package com.example.produces.service.impl;

import com.example.produces.entity.Seller;
import com.example.produces.mapper.SellerMapper;
import com.example.produces.service.SellerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional
public class SellerImpl implements SellerService {
    @Autowired
    private SellerMapper sellerMapper;
    @Override
    public List<Seller> findAll() {
        List<Seller>sellers=sellerMapper.findAll();
        return sellers;
    }

    @Override
    public void add(Seller seller) {
      sellerMapper.add(seller);
    }

    @Override
    public Seller findOne(String name) {
        return sellerMapper.findOne(name);
    }

    @Override
    public void upDate(Seller seller) {
      sellerMapper.upDate(seller);
    }

    @Override
    public void delete(String name) {
       sellerMapper.delete(name);
    }
}
